<?php
  require_once('tpl/header.php');
?>

  <?php 
	/*mysql_connect("localhost","root","");
	mysql_select_db("neuvideo");
	mysql_query("set names utf8");*/
	// require("../system/dbConn.php");
		connect();

	$uid=$_GET["uid"];
	$sql="select* from users where uid=$uid";
	$result=mysql_query($sql);
	$row=mysql_fetch_assoc($result);
?>


	<table class="table table-bordered">
		<h1>请修改用户信息</h1>
		<form action="doUserUpdate.php" method="post" enctype="multipart/form-data">
			<input type="hidden" name="uid" value=<?php echo $uid;?>>
		<tr>
			<td>用户名</td>
			<td><input type="text" name="username" value=<?php echo $row["uname"]; ?>></td>
		</tr>
		<tr>
			<td>性别</td>
			<td><input type="radio" name="gender" value="0" <?php if($row["gender"]==0) echo "checked"; ?>>男
				<input type="radio" name="gender" value=<?php if($row["gender"]==0) echo "checked"; ?>>女</td>
		</tr>
		<tr>
			<td>生日</td>
			<td><input type="date" name="birthdate" value=<?php echo $row["birthdate"]; ?>></td>
		</tr>
		<tr>
			<td>头像</td>
			<td><input type="file" name="pic" value="">
				原头像：<img src="../images/<?php echo $row["pic"]; ?>"  width="100px" height="auto"></td>
		</tr>
		<tr>
			<td>邮箱</td>
			<td><input type="email" name="email" value=<?php echo $row["email"]; ?>></td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" value="更新"></td>
		</tr>
		</form>
	</table>
		



<?php
  require_once('tpl/footer.php');
?>